package com.yqd.lesson.actor.six

import scala.concurrent.duration._
import akka.actor.{ActorRef, ActorSystem}


object  Main extends App {

  val system = ActorSystem("akka");
  val sender: ActorRef = system.actorOf(Sender.props, "myactor")

  var count = 0;
  import system.dispatcher
  system.scheduler.schedule(1.second,1.second){
    count += 1;
    println("record:" + count)
    sender ! "" + count
  }


}
